Skip to content

Fix DictSupplementaryFileContainer: refcount never incremented, delete_file never frees memory#513

Merged
s-heppner merged 1 commit into
eclipse-basyx:developfrom
rwth-iat:fix/b2-aasx-refcount
May 14, 2026
Merged

Fix DictSupplementaryFileContainer: refcount never incremented, delete_file never frees memory#513
s-heppner merged 1 commit into
eclipse-basyx:developfrom
rwth-iat:fix/b2-aasx-refcount

Conversation

@zrgt
Copy link
Copy Markdown
Contributor

@zrgt zrgt commented May 5, 2026

Fixes #495

Changes

  • _assign_unique_name: increment _store_refcount[sha] when creating a new _name_map entry (first loop branch) — without this, count stays at 0 and delete_file's == 0 check never triggers
  • rename_file: decrement _store_refcount[file_hash] when removing the old name entry from _name_map, consistent with delete_file behavior
  • Add test_supplementary_file_container_refcount — verifies backing store is freed only after the last reference is deleted

@s-heppner s-heppner merged commit ca78e9a into eclipse-basyx:develop May 14, 2026
15 checks passed
@s-heppner s-heppner deleted the fix/b2-aasx-refcount branch May 14, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants